The present invention relates to an image forming apparatus such as a copying machine, and in particular to a digital copying machine which forms an optimal image using a density histogram of a document or original image.
A so-called automatic exposure adjusting function where an optimal image is obtained by changing brightness of a document-illuminating lamp while detecting a density of a document or original image is a general function in an analog copying machine. In order to realize a function similar to the automatic exposure adjusting function in such an analog copying machine, such a measure is employed in a conventional digital copying machine that an optimal density is reproduced for each of documents of various kinds.
A method where an optimal image is obtained using a pixel density histogram indicating the number of existing pixels on a document image corresponding to each density is commonly employed in conventional machines. However, in order to perform image processing for improving image quality by pre-scanning a document and preparing a density histogram using all sampled pixels, not only a large amount of memory but also a large-scale of hardware and a considerably long processing time are required. Also, in a case that the pre-scanning processing is performed, scan must be performed twice, which results in reduction in productivity.
In order to solve this problem, in Jpn. Pat. Appln. KOKAI Publication No. 8-88772, such a technique has been disclosed that, in a real time automatic density adjusting system, histograms for respective image lines read by a scanner are accumulated and a reference value for range correction is sequentially changed on the basis of the result of the accumulation to perform an automatic density adjusting processing for each document. The reference value for range correction is a reference value applied when the density of image to be printed is corrected on the basis of a background density and a character or letter density of a document.
In the system disclosed in the above publication, the reference value for range correction is sequentially changed for each image line on the basis of the histograms accumulated. Therefore, even in a case of characters or photographs with the same density in one document, information about the accumulated histograms thereof varies according to the status of a document image around the characters or photographs, which results in difference in reference value for range correction. Accordingly, it has been difficult to achieve even density reproduction in a document image. When the reference value for range correction is fixed in order to achieve even density reproduction in a document image, of course, it becomes impossible to achieve an optimal density adjustment to another document with a different background density.
Also, in Jpn. Pat. Appln. KOKAI Publication No. 8-317149, a method or process where any pre-scanning is not performed as image data is stored in RAM has been disclosed. In this method, however, a background processing is not performed as image processing but it is performed as circuit control using a data comparator. In this publication, therefore, it has been impossible to remove a background and reproduce a character(s) densely, which can be achieved in a range correction processing performed as the image processing.